﻿<div class="easyui-panel" data-options="fit:true" style="padding:25px;">
    <input id="t1" type="text" class="easyui-textbox" value="123" />
</div>

<script>
    $(function () {
        var input = $("#t1").textbox("textbox"),
            value = $("#t1").textbox("getValue"),
            len = value.length,
            inputDom = input[0];

        var selectionStart = len, selectionEnd = len;
        if (inputDom.setSelectionRange) {
            inputDom.focus();
            inputDom.setSelectionRange(selectionStart, selectionEnd);
        }
        else if (inputDom.createTextRange) {
            var range = inputDom.createTextRange();
            range.collapse(true);
            range.moveEnd('character', selectionEnd);
            range.moveStart('character', selectionStart);
            range.select();
        }
    });
</script>